home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 August / PC Plus SuperCD 50b Issue 142 (CD142b) (August 1998).iso / full / nt / MSSql / I386 / sqlx86.exe / PTK / SAMPLES / SQLDMO / VB / EXPLORE / EXPLORE.BAS next >
Encoding:
BASIC Source File  |  1996-04-03  |  2.2 KB  |  78 lines

  1. Attribute VB_Name = "basExplore"
  2. Option Explicit
  3.  
  4. ' Global constants
  5. Public oSQLServer As SQLOLE.SQLServer
  6. Public oCurrentOne As Object
  7. Public oCurrentTwo As Object
  8. Public oCurrentThree As Object
  9. Public oCurrentFour As Object
  10.  
  11. Public NL As String
  12. Sub GetCollection(oObject As Object, strCollection As String, oCollection() As Object)
  13.     Select Case strCollection
  14.     
  15.     ' SQLServer
  16.     Case "Databases"
  17.         Set oCollection(0) = oObject.Databases
  18.     Case "Devices"
  19.         Set oCollection(0) = oObject.Devices
  20.     Case "Languages"
  21.         Set oCollection(0) = oObject.Languages
  22.     Case "Logins"
  23.         Set oCollection(0) = oObject.Logins
  24.     Case "RemoteServers"
  25.         Set oCollection(0) = oObject.RemoteServers
  26.     Case "Alerts"
  27.         Set oCollection(0) = oObject.Alerts
  28.     Case "Operators"
  29.         Set oCollection(0) = oObject.Operators
  30.     
  31.     ' Database
  32.     Case "Defaults"
  33.         Set oCollection(0) = oObject.Defaults
  34.     Case "Groups"
  35.         Set oCollection(0) = oObject.Groups
  36.     Case "Rules"
  37.         Set oCollection(0) = oObject.Rules
  38.     Case "StoredProcedures"
  39.         Set oCollection(0) = oObject.StoredProcedures
  40.     Case "SystemDataTypes"
  41.         Set oCollection(0) = oObject.SystemDatatypes
  42.     Case "Tables"
  43.         Set oCollection(0) = oObject.Tables
  44.     Case "UserDefinedDataTypes"
  45.         Set oCollection(0) = oObject.UserDefinedDatatypes
  46.     Case "Users"
  47.         Set oCollection(0) = oObject.Users
  48.     Case "Views"
  49.         Set oCollection(0) = oObject.Views
  50.     Case "Publications"
  51.         Set oCollection(0) = oObject.Publications
  52.     Case "Articles"
  53.         Set oCollection(0) = oObject.Articles
  54.     Case "Subscriptions"
  55.         Set oCollection(0) = oObject.Subscriptions
  56.     
  57.     ' RemoteServer
  58.     Case "RemoteLogins"
  59.         Set oCollection(0) = oObject.RemoteLogins
  60.  
  61.     ' Table
  62.     Case "Columns"
  63.         Set oCollection(0) = oObject.Columns
  64.     Case "Indexes"
  65.         Set oCollection(0) = oObject.Indexes
  66.     Case "Triggers"
  67.         Set oCollection(0) = oObject.Triggers
  68.     Case "Keys"
  69.         Set oCollection(0) = oObject.Keys
  70.     Case "Checks"
  71.         Set oCollection(0) = oObject.Checks
  72.  
  73.     End Select
  74.     
  75. End Sub
  76.  
  77.  
  78.